﻿using System;
using DevExpress.XtraSplashScreen;
using Sumen.Business.Presenter.Report;
using Sumen.Library.Froms;


namespace Sumen.GUI.Report
{
    public partial class ReportInwardOutward : XtraUserControlKira
    {
        private ReportInwardOutwardPresenter _reportInwardOutwardPresenter;

        public ReportInwardOutward()
        {
            InitializeComponent();
            _reportInwardOutwardPresenter = new ReportInwardOutwardPresenter();
            txtDate.DateTime = DateTime.Now;
        }



        private void btnView_Click(object sender, EventArgs e)
        {
            LoadForm();
        }



        public override void LoadForm()
        {
            var list = _reportInwardOutwardPresenter.TotalInwardOutwardByMonthInYear(txtDate.DateTime.Year);
            chartControl1.DataSource = list;
            //chartControl1.ExportToXlsx("e:/abc.xlsx");
        }


    }
}